package view;

import java.awt.Container;
import javax.swing.JDialog;
import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import options.view.ViewSettings;

public class Informations extends JDialog {

	private static final long serialVersionUID = 8675535441482925348L;
	private JPanel jContentPane = null;
	private JLabel lblPratola = null;
	private JLabel lblCostante = null;
	private JLabel lblPolese = null;
	private JLabel lblPennino = null;
	private JEditorPane editorTitle = null;
	private JLabel lblImage = null;
	
	/**
	 * This is the default constructor
	 */
	public Informations(Container container) {
		super((JFrame) container, "Informazioni su...");
		
		initialize();
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		this.setSize(370, 225);
		this.setResizable(false);
		this.setLayout(null);
		this.add(getJContentPane(), null);
		this.setVisible(true);
		ViewSettings.getSettings().centerDialog(this);
	}

	/**
	 * This method initializes jContentPane
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJContentPane() {
		if (jContentPane == null) {
			lblImage = new JLabel(ViewSettings.getSettings().getImageIcon());
			lblImage.setBounds(new java.awt.Rectangle(100,10,32,32));
			lblCostante = new JLabel();
			lblCostante.setBounds(new java.awt.Rectangle(200,108,140,14));
			lblCostante.setText("Costante Elisa - 393000125");
			lblPennino = new JLabel();
			lblPennino.setBounds(new java.awt.Rectangle(200,88,151,14));
			lblPennino.setText("Pennino Igino - 393000129");
			lblPolese = new JLabel();
			lblPolese.setBounds(new java.awt.Rectangle(200,68,140,14));
			lblPolese.setText("Polese Marina - 393000111");
			lblPratola = new JLabel();
			lblPratola.setBounds(new java.awt.Rectangle(200,128,140,14));
			lblPratola.setText("Pratola Roberto - 393000130");
			jContentPane = new JPanel();
			jContentPane.setLayout(null);
			jContentPane.setBackground(this.getBackground());
			jContentPane.setBounds(5, 5, this.getWidth() - 15 , this.getHeight() - 40);
			jContentPane.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED));
			jContentPane.add(lblCostante, null);
			jContentPane.add(lblPennino, null);
			jContentPane.add(lblPolese, null);
			jContentPane.add(lblPratola, null);
			
			jContentPane.add(getEditorTitle(), null);
			jContentPane.add(lblImage, null);
		}
		return jContentPane;
	}

	/**
	 * This method initializes editorTitle	
	 * 	
	 * @return javax.swing.JEditorPane	
	 */
	private JEditorPane getEditorTitle() {
		if (editorTitle == null) {
			editorTitle = new JEditorPane();
			editorTitle.setBounds(new java.awt.Rectangle(136,11,79,31));
			editorTitle.setText("TEAM 5");
			editorTitle.setBackground(this.getBackground());
			editorTitle.setEnabled(true);
			editorTitle.setEditable(false);
			editorTitle.setFont(new java.awt.Font("Tahoma", java.awt.Font.BOLD | java.awt.Font.ITALIC, 18));
		}
		return editorTitle;
	}

}
